const multer = require("multer");
const path = require("path");
const createStorage = () => {
  return multer.diskStorage({
    destination: (req, file, cb) => {
      cb(null, path.join(__dirname, '/../../uploads'));
    },
    filename: (req, file, cb) => {
      cb(null, `${Date.now()}${path.extname(file.originalname)}`);
    },
  });
};

module.exports = {
    createStorage,
}